package org.vaadinpa.gui;

import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;

@SuppressWarnings("serial")
public abstract class AbstractView extends VerticalLayout {

	public AbstractView() {

		addStyleName(Reindeer.LAYOUT_BLACK);

		Label l = new Label(getTitle());
		l.setStyleName("mainCaption");
		super.addComponent(l);

		setWidth("100%");
		setMargin(false, true, false, false);
	}

	public abstract void reload();

	public abstract String getTitle();

	@Override
	public void removeAllComponents() {

		super.removeAllComponents();
		Label l = new Label(getTitle());
		l.setStyleName("mainCaption");
		super.addComponent(l);
	}
}
